#pragma once

#ifndef _CBLOWFISH_H_
#define _CBLOWFISH_H_

#include "md52.h"

#define little_endian

#define MAXKEYBYTES 56
#define N 16
#define noErr            0
#define DATAERROR         -1
#define KEYBYTES         8
#define subkeyfilename   "BLOWFISH.DAT"

class CBlowfish {

private:
	CBlowfish::CBlowfish();
	CBlowfish::~CBlowfish();

public:
	static short		 CBlowfish::opensubkeyfile(void);
	static unsigned long CBlowfish::F(unsigned long x);
	static void			 CBlowfish::encipher(unsigned long *xl, unsigned long *xr, unsigned long * P, unsigned long * S);
	static void			 CBlowfish::decipher(unsigned long *xl, unsigned long *xr, unsigned long * P, unsigned long * S);
	static unsigned long * CBlowfish::init(char key[], short keybytes, unsigned long * P, unsigned long * S);

};
#endif